﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Collections.Generic;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TSHWB04
    {
        public TSHWB04()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            InitializeComponent();
        }
        public override void LOADBYAUF()
        {
            base.LOADBYAUF();
        }
        public override void OnIsAppendChg(bool _IsAppend)
        {     
            try
            {
                if (!IsAppend)
                    return;
                if (dwABP == null)
                    return;
                PM["dwABP"] = dwABP;
                PM["IsAppend"] = IsAppend;
                PM["WB04KEY"] = KEY;
                PM["PARTIE"] = PARTIE;
                PM["CUSER"] = app.User;
                PM["IsClear"] = false; 
                PM["VKDELDATE"] = TMV.date;
                PM["LOOMID"] =Helper.Left( LOOMID.PadRight(4),4);               
                DataRow dwWBB = TMV.APPENDWB61(PM);
                STKNR = dwWBB["WBBSTKNR"].ToString();
                base.OnIsAppendChg(_IsAppend);
            }    
            catch(Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
      
        } 
      
    }
}
